<?php
	include "login.php";
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Cadastro de Categoria</title>
<link href="config.css" rel="stylesheet" type="text/css" />
<script src="jquery-1.5.1.min.js" type="text/javascript"></script>
<script src="jquery.validate.min.js" type="text/javascript"></script>
<script type="text/javascript">

$().ready(function() {	
	
	// validate signup form on keyup and submit
	$("#formCadastro").validate({
		rules: {			
			nome: "required",			
		},
		messages: {			
			nome: "Preencha o nome da categoria",			
		}
	});	
});
</script>
</head>

<body>
	<div id="pagina">
    	<div id="logo"></div>
        <div id="caixa">
        	Bem-vindo:
            <?php
				echo $_SESSION["usuario"]["nome"];
			?>
            <br />
			<a href="senha.php">Alterar Senha</a>
            <br />
            <a href="sair.php">Desconectar-se</a>
        </div><!-- fim da caixa -->
        <div id="menu">
        	<?php
				include "menu.php";
			?>
        </div> <!-- fim do menu -->
        
        <div id="pesquisa">
        	<form name="pesquisa" method="post" action="categoriaPesquisar.php">
            	<label for="palavra">Palavra-chave:</label>
                <input type="text" name="palavra" size="20" />
                <br />
                <label for="filtro">Selecione o Filtro:</label>
                <br />
                <select name="filtro">
                	<option value="nome">Nome</option>
                    <option value="id">ID</option>
                </select>
                <br />
                <input type="submit" value="Pesquisar" />
            </form>
        </div> <!-- fim da pesquisa -->
        
        <div id="conteudo">
        	<h1>Cadastro de Categorias</h1>
            
            <form action="categoriaSalvar.php" method="post" name="formCadastro" id="formCadastro">         
				<fieldset>
                	<legend> Preencha os campos: </legend>
                    <label for="nome">Nome da Categoria:</label>
                    <input type="text" name="nome" id="nome" size="50" maxlength="50"/>              
                    <br />
                    <br />
                    <input type="submit" value="Gravar Dados" />
                    <input type="reset" value="Redefinir" />                    
                </fieldset>
            
            </form>
            
      </div> <!-- fim do conteudo -->
    </div><!-- fim da pagina -->
</body>
</html>
